import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '标题',
    align: "center", resizable: true,
    dataIndex: 'title'
  },
	{
	  title: '项目',
	  align: "center",
	  dataIndex: 'projectId_dictText'
	},
  {
    title: '总包信息',
    align: "center", resizable: true,
    dataIndex: 'companyInfoId_dictText'
  },
  {
    title: '项目名称',
    align: "center", resizable: true,
    dataIndex: 'projectName'
  },

  {
    title: '开票日期',
    align: "center", resizable: true,
    dataIndex: 'invoiceDate',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
/*  {
    title: '开票人',
    align: "center", resizable: true,
    dataIndex: 'invoicer'
  },*/
/*  {
    title: '发票类型',
    align: "center", resizable: true,
    dataIndex: 'invoiceType'
  },*/
  {
    title: '发票号码',
    align: "center", resizable: true,
    dataIndex: 'invoiceNumber',
    width: 200
  },
  {
    title: '开票申请',
    align: "center", resizable: true,
    dataIndex: 'cinvoiceApplyAsk',
  },
  {
    title: '关联收款记录',
    align: "center", resizable: true,
    dataIndex: 'paymentRecordList',
  },
  {
    title: '价税合计',
    align: "center", resizable: true,
    dataIndex: 'totalAmountWithTax'
  },
  {
    title: '合计税额',
    align: "center", resizable: true,
    dataIndex: 'totalTaxAmount'
  },
  {
    title: '金额',
    align: "center", resizable: true,
    dataIndex: 'amount'
  },
  {
    title: '税率%',
    align: "center", resizable: true,
    dataIndex: 'taxRate'
  },
  {
    title: '销售方名称',
    align: "center", resizable: true,
    dataIndex: 'sellerName'
  },
/*  {
    title: '购买方名称',
    align: "center", resizable: true,
    dataIndex: 'buyName'
  },*/
  {
    title: '开票阶段',
    align: "center", resizable: true,
    dataIndex: 'stage',

  },
  {
    title: '附件',
    align: "center", resizable: true,
    dataIndex: 'attachmentUrl'
  },
  {
    title: '发票',
    align: "center", resizable: true,
    dataIndex: 'billFile'
  },


];

// 高级查询数据
export const superQuerySchema = {
  projectName: {title: '项目名称',order: 0,view: 'text', type: 'string',},
  invoiceDate: {title: '开票日期',order: 2,view: 'date', type: 'string',},
  invoicer: {title: '开票人',order: 3,view: 'text', type: 'string',},
  invoiceType: {title: '发票类型',order: 4,view: 'text', type: 'string',},
  invoiceNumber: {title: '发票号码',order: 9,view: 'text', type: 'string',},
  amount: {title: '金额',order: 10,view: 'number', type: 'number',},
  sellerName: {title: '销售方名称',order: 11,view: 'text', type: 'string',},
  buyName: {title: '购买方名称',order: 13,view: 'text', type: 'string',},
  stage: {title: '开票阶段',order: 18,view: 'text', type: 'string',},
};
